#!/usr/bin/env python
import smbus
import time
import send_measurement

#Rev2 of Rasperry Pi uses I2C channel 1 = /dev/i2c-1 (change to 0 for Rev1)
i2c_bus = smbus.SMBus(1)
#digital output of the digital-to-analog converter (adc) PCF8591
I2C_ADDRESS = 0x48

measurement = i2c_bus.read_byte(I2C_ADDRESS)

send_measurement.send_measurement("%d" % measurement)
